package com.qijian.common.enums;


import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

@Getter
@AllArgsConstructor
public enum FlowableKeyEnum {

    point_t("point_t", "/info_production/PointOrderDetail"),
    point("point", "/info_basic/myToDo"),

    std_point_t("std_point_t", "/info_production/standardDetail"),
    std_point("std_point", "/info_basic/myToDo"),

    eval_administrative_penalty_t("eval_administrative_penalty_t", "/info_human/penaltiesDetail"),
    eval_administrative_penalty("eval_administrative_penalty", "/info_basic/myToDo"),

    purm_supplier_apply_t("purm_supplier_apply_t", "/info_production/supplierDetail"),
    purm_supplier_apply("purm_supplier_apply", "/info_basic/myToDo"),

    purm_supplier_retrial_t("purm_supplier_retrial_t", "/info_production/supplierReviewDetail"),
    purm_supplier_retrial("purm_supplier_retrial", "/info_basic/myToDo"),

    bom_process_documents_t("bom_process_documents_t", "/info_process/bomStorageList?bomId="),

    otd_record_ncr_t("otd_record_ncr_t", "/flow_able/process_details"),
    otd_record_ncr("otd_record_ncr", "/info_basic/myToDo"),

    wlyq_ncr_t("wlyq_ncr_t", "/info_logistics/beingNcrDetail?flowType=wlyq_ncr"),
    wlyq_ncr("wlyq_ncr", "/info_basic/myToDo"),

    scyq_ncr_t("scyq_ncr_t", "/production_flow/process_details?flowType=scyq_ncr"),
    scyq_ncr("scyq_ncr", "/info_basic/myToDo"),

    flow_re_eq("flow_re_eq", "/info_basic/myToDo"),

    flow_re_eq_t("flow_re_eq_t", "/info_basic/myToDo"),

    flow_re_eq_c("flow_re_eq_c", "/info_basic/myToDo"),

    flow_re_eq_c_t("flow_re_eq_c_t", "/info_basic/myToDo"),

    flow_re_gz("flow_re_gz", "/info_basic/myToDo"),

    flow_re_gz_t("flow_re_gz_t", "/info_basic/myToDo"),

    flow_re_gz_c("flow_re_gz_c", "/info_basic/myToDo"),

    flow_re_gz_c_t("flow_re_gz_c_t", "/info_basic/myToDo"),


    flow_re_eq_bf("flow_re_eq_bf", "/info_basic/myToDo"),
    flow_re_eq_bf_t("flow_re_eq_bf_t", "/info_basic/myToDo"),

    flow_re_gz_bf("flow_re_gz_bf", "/info_basic/myToDo"),
    flow_re_gz_bf_t("flow_re_gz_bf_t", "/info_basic/myToDo"),


    flow_re_knife_pick("flow_re_knife_pick", "/info_basic/myToDo"),
    flow_re_knife_pick_t("flow_re_knife_pick_t", "/info_basic/myToDo"),

    flow_re_knife_return("flow_re_knife_return", "/info_basic/myToDo"),
    flow_re_knife_return_t("flow_re_knife_return_t", "/info_basic/myToDo"),


    flow_re_knife_sale("flow_re_knife_sale", "/info_basic/myToDo"),
    flow_re_knife_sale_t("flow_re_knife_sale_t", "/info_basic/myToDo"),


    flow_re_knife_move("flow_re_knife_move", "/info_basic/myToDo"),
    flow_re_knife_move_t("flow_re_knife_move_t", "/info_production/productSource"),



    flow_re_knife_transfer("flow_re_knife_transfer", "/info_basic/myToDo"),
    flow_re_knife_transfer_t("flow_re_knife_transfer_t", "/info_basic/myToDo"),


    flow_order_de_ex("flow_order_de_ex", "/info_basic/myToDo"),
    flow_order_de_ex_t("flow_order_de_ex_t", "/info_basic/myToDo"),

    flow_process_performance("flow_process_performance", "/info_basic/myToDo"),
    flow_process_performance_t("flow_process_performance_t", "/info_process/performance/addOrder?routeStatus=check"),

    flow_process_craft_dispatch("flow_process_craft_dispatch", "/info_basic/myToDo"),
    flow_process_craft_dispatch_t("flow_process_craft_dispatch_t", "/info_process/performance/processWorkflow/addOrder?routeStatus=check"),

    flow_fin_finance_dispatch("flow_fin_finance_dispatch", "/info_basic/myToDo"),
    flow_fin_finance_dispatch_t("flow_fin_finance_dispatch_t", "/info_financial/detailFinancial?routeStatus=check"),

    bomMaterial_t("bomMaterial_t", "/materials_flow/materials_details?isShow=true&flowType=bomMaterial"),
    bomMaterial("bomMaterial", "/info_basic/myToDo"),


    ncrProgramme_t("ncrProgramme_t", "/ncrManagement_flow/process_details?isShow=true&flowType=ncrProgramme"),
    ncrProgramme("ncrProgramme", "/info_basic/myToDo"),
    flow_quality_craft_dispatch("flow_quality_craft_dispatch", "/info_basic/myToDo"),
    flow_quality_craft_dispatch_t("flow_quality_craft_dispatch_t", "/info_quality/dispatch/addOrder?routeStatus=check"),

    flow_adjustOrder("flow_adjustOrder", "/info_basic/myToDo"),

    flow_adjustOrder_t("flow_adjustOrder_t", "/info_process/accountingWork/processWorkflow/addOrder?routeStatus=check"),

    flow_fin_cost_ex("flow_fin_cost_ex", "/info_basic/myToDo"),

    flow_fin_cost_ex_t("flow_fin_cost_ex_t", "/info_process/costAbnormalDetail"),
    ;

    @EnumValue
    private final String value;

    @JsonValue
    private final String description;

    private static final Map<String, String> ENUM_FLOW_MAP = new HashMap<>();

    static {
        for (FlowableKeyEnum item : values()) {
            ENUM_FLOW_MAP.put(item.getValue(), item.getDescription());
        }
    }

    public static String flowToValues(String value) {
        return ENUM_FLOW_MAP.get(value);
    }


}
